package com.glsc.ngateway.common.base.domainmapper.cmdb;
import com.glsc.ngateway.common.base.domain.mysql.cmdb.CmdbDeviceDetail;
import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow.cmdb.FlowFormDeviceInDetail;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Author: zhengyr
 * @Desc: 配件入库流程表到业务表转换
 */
@Mapper(componentModel = "spring")
public interface FlowFormDeviceInMapper {

    FlowFormDeviceInMapper INSTANCE = Mappers.getMapper(FlowFormDeviceInMapper.class);

    @Mapping(target = "deviceDetailId", ignore = true)
    @Mapping(target = "deviceDetailCode", ignore = true)
    @Mapping(target = "assertNum", ignore = true)
    @Mapping(target = "isDelete", ignore = true)
    @Mapping(target = "brand", ignore = true)
    @Mapping(target = "deviceType", ignore = true)
    @Mapping(target = "memoryTotalCapacity", ignore = true)
    @Mapping(target = "machineCabinetId", ignore = true)
    @Mapping(target = "machineCabinetUId", ignore = true)
    @Mapping(target = "cmdbDeviceStandard", ignore = true)
    @Mapping(target = "cmdbCpudetail", ignore = true)
    @Mapping(target = "cmdbMemoryDetail", ignore = true)
    @Mapping(target = "cmdbDiskDetail", ignore = true)
    @Mapping(target = "cmdbPartDetail", ignore = true)
    CmdbDeviceDetail dto2domain(FlowFormDeviceInDetail dto);

    List<CmdbDeviceDetail> dto2domain(List<FlowFormDeviceInDetail> dto);
}
